import request from '@/utils/request'
// 获取一级城市列表
export const getCity = () => {
  return request.get('/area/city', {
    params: {
      level: 1
    }
  })
}
// 获取热门城市
export const getHotCity = () => {
  return request.get('/area/hot')
}

// 获取当前城市信息
export const getCityInfo = (name) => {
  return request.get('/area/info', {
    params: { name }
  })
}

// 小区关键词搜索
export const getList = (name, id) => {
  return request.get(`/area/community?name=${name}&id=${id}`)
}

export const getAreaMap = (id) => {
  return request.get(`/area/map?id=${id}`)
}

export const getAreaList = (id) => {
  return request.get(`/area?id=${id}`)
}
